<!doctype html>
<html class="no-js">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>{$meta_title}</title>

		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="icon" type="image/png" href="">
		<link rel="apple-touch-icon-precomposed" href="">
		<meta name="apple-mobile-web-app-title" content="{$meta_title}" />
		<link rel="stylesheet" href="__ROOT__/Application/Home/View/default/assets/css/amazeui.min.css" />
		<link rel="stylesheet" href="__ROOT__/Application/Home/View/default/assets/css/admin.css">
		<link rel="stylesheet" href="__ROOT__/Application/Home/View/default/assets/css/mycss.css">

		<script type="text/javascript" src="__PUBLIC__/libs/dingding/javascripts/zepto.min.js"></script>
		<script type="text/javascript" src="http://g.alicdn.com/dingding/dingtalk-pc-api/2.6.2/index.js"></script>
	</head>

	<body>

		<style>
			.page {
				clear: both;
				text-align: center;
				padding: 30px 10px 30px 10px;
				height: 40px;
			}
			
			.page li {
				display: inline;
				margin-right: 8px;
			}
			
			li.active.current a {
				background: #0e90d2;
				border: 1px solid #0e90d2;
				color: #fff;
			}
			
			.page a {
				color: #0e90d2;
				font-size: 0.9em;
				border: 1px solid #ddd;
				text-decoration: none;
				padding: 8px 12px;
			}
			
			.page a:hover {
				background-image: none;
				background-color: #ccc;
				color: #FFF;
			}
			
			.page strong {
				background-color: #0e90d2;
				padding: 4px 8px;
				color: #FFF;
				border: 1px solid #0e90d2;
				font-weight: normal;
			}
		</style>

		<div class="am-cf admin-main">
			<!-- sidebar start -->
			<div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
				<div class="am-offcanvas-bar admin-offcanvas-bar">
					<ul class="am-list admin-sidebar-list">
						<li>
							<a href="#"><span><img alt="{$user_info.name}" src="{$user_info.avatar}"  style="display: block; margin: 0 auto; width: 80%;border-radius: 50%;"></span> {$user_info.name}</a>
						</li>
						<li>
							<a href="/Home/Task/shouye"><span class="am-icon-home"></span> 首页</a>
						</li>
						<li class="nav-active">
							<a href="/Home/Task/mytask"><span class="am-icon-file"></span> 任务</a>
						</li>
						<li>
							<a href="/Home/Task/dongtai"><span class="am-icon-table"></span>动态</a>
						</li>
						<li>
							<a href="/Home/Task/addnew"><span class="am-icon-pencil-square-o"></span> 新增</a>
						</li>

					</ul>

				</div>
			</div>
			<!-- sidebar end -->

			<!-- content start -->
			<div class="admin-content">
				<div class="admin-content-body">
					<div class="am-cf am-my-title">我的任务</div>
					<div class="am-g am-tabs am-my-margin">
					  	<div class="am-u-sm-3">
					  		<ul class="am-tabs-nav am-nav am-nav-tabs">
								<li id="tab_2">
									<a href="{:U('Home/Task/mytask',array('status'=>2))}">未开始</a>
								</li>
								<li id="tab_1">
									<a href="{:U('Home/Task/mytask',array('status'=>1))}">进行中</a>
								</li>
								<li id="tab_3">
									<a href="{:U('Home/Task/mytask',array('status'=>3))}">已完成</a>
								</li>
							</ul>
					  	</div>
					  	<div class="am-u-sm-9 am-tabs-bd">
					  		<div class="am-tab-panel am-fade am-in am-active am-footer-default">

								<table class="am-table am-table-striped am-table-hover table-main">
									<thead>
										<tr>
											<th>项目编号</th>
											<th>执行人</th>
											<th>任务内容</th>
											<th>任务类型</th>
											<th>任务级别</th>
											<th>发布人</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<volist name="task_list" id="vo" key="k">
											<tr>
												<td>
													<a href="/Home/Task/sontask/pid/{$vo.id}">{$vo.projectid}</a>
												</td>
												<td>{$vo.uid}</td>
												<td>{$vo.content|mb_substr=###,0,10,'utf-8'}....
													<a href="javascript:taskInfo('{$vo.content}');">详细</a>
												</td>
												<td>{$vo.type}</td>
												<td>{$vo.emergency_level}</td>
												<td>{$vo.creater}</td>
												<td>
													<if condition="$vo.status eq 1 ">
														<a href="/Home/Task/finishTask/id/{$vo.id}"><span class="am-badge am-badge-success">完成任务</span></a>
														<a href="/Home/Task/addson/pid/{$vo.id}"><span class="am-badge am-badge-warning">子任务</span></a>
														<elseif condition="$vo.status eq 2 " />
														<a href="/Home/Task/starTask/id/{$vo.id}"><span class="am-badge am-badge-danger">开始任务</span></a>
														<a href="/Home/Task/addson/pid/{$vo.id}"><span class="am-badge am-badge-warning">子任务</span></a>
														<elseif condition="$vo.status eq 3 " />

														<a href="/Home/Task/addson/pid/{$vo.id}"><span class="am-badge am-badge-warning">子任务</span></a>

													</if>

												</td>

											</tr>
										</volist>

									</tbody>
								</table>
								<div class="page">
									{$page}
								</div>

							</div>
					  	</div>
					</div>
				</div>
			</div>
			<!-- content end -->

		</div>

		<script type="text/javascript">
			$(document).ready(function() {
				var status={$status};

				document.getElementById('tab_' + status).className = 'am-active';

			});

			function taskInfo(content) {
				DingTalkPC.device.notification.alert({
					message: content,
					title: "任务详情", //可传空
					buttonName: "知道了",
					onSuccess: function() {
						/*回调*/
					},
					onFail: function(err) {}
				});

			}
		</script>

		<script src="__ROOT__/Application/Home/View/default/assets/js/jquery.min.js"></script>

		<script src="__ROOT__/Application/Home/View/default/assets/js/amazeui.min.js"></script>
		<script src="__ROOT__/Application/Home/View/default/assets/js/app.js"></script>
	</body>

</html>